home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 June
/
MACPOWER-1997-06.ISO.7z
/
MACPOWER-1997-06.ISO
/
AMUG
/
PROGRAMMING
/
BSDSoundLib 1.0.1.sit
/
BSDSoundLib dist
/
BSDSoundLib ƒ
/
BSDSoundLib.h
< prev
next >
Wrap
Text File
|
1997-01-21
|
2KB
|
93 lines
/*
File: BSDSoundLib.h
Contains: BSDSoundLib Headers.
Version: Technology: Torture Chamber v1.0
Package: BSDSoundLib v1.0
Copyright: ゥ 1996, BuggySoftェ Development.
By Scott Dunbar
*/
#ifndef __BSDSOUNDLIB_
#define __BSDSOUNDLIB_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef __SOUND__
#include <Sound.h>
#endif
// Use these with SetChanVol()
#define kMaxLeft -128 // left channel max; right channel min
#define kMaxRight 128 // left channel min; right channel max
#define kBalanced 0 // left & right channels equal
#define kMaxSndChans 25 // Maximum number of sound channels allowed
extern short numChannels; // total channels allocated
extern Boolean sndChanActive[kMaxSndChans], loopingActive; // true if sound channel is active
// InitSoundUtils();
// Call before using any other routines from this library
extern void InitSoundUtils (void);
// DisposeSoundUtils();
// Call when finished using this library
extern void DisposeSoundUtils (void);
// short chan = FindFreeChannel();
// Use this to get the number of a free sound channel
extern short FindFreeChannel (void);
// PlaySound(chanNum, snd);
// Use this to play a sound on a certain channel
// PlaySound(FindFreeChannel(), snd);
// Use like that to play on any channel
extern void PlaySound (short chanNum, Handle snd);
// PlaySnd(snd);
// Use this to play a sound asyncrously.
extern void PlaySnd (Handle snd);
// SilenceChannel(chanNum);
// Use this to silence a sound channel
extern void SilenceChannel (short chanNum);
// SetChaneVol(chanNum, kMaxLeft);
// SetChaneVol(chanNum, kBalanced);
// SetChaneVol(chanNum, kMaxRight);
// Use this to set the volume of a sound channel and for stereo effects (panning...etc.)
extern void SetChanVol (short chanNum, short balance);
// BalanceSndChannels();
// Use to reset the volume levels on all sound channels
extern void BalanceSndChannels (void);
// InitLoopingSounds();
// Call before playing any looping sounds
extern void InitLoopingSounds (void);
// DisposeLoopingSounds();
// Call when finished playing looping sounds
extern void DisposeLoopingSounds (void);
// PlayLoopingSound(snd);
// Use this to start a sound looping
extern void PlayLoopingSound (Handle snd);
// SilenceLoopingChannel();
// Use this to stop a looping sound
extern void SilenceLoopingChannel (void);
#ifdef __cplusplus
}
#endif
#endif